//
//  PopMenu.h
//  CC
//
//  Created by Calvin on 4/27/15.
//  Copyright (c) 2015 Calvin. All rights reserved.
//

#import <UIKit/UIKit.h>

@class PopMenu;
typedef enum{
    PopMenuArrowPositionCenter=0,
    PopMenuArrowPositionLeft=1,
    PopMenuArrowPositionRight=2
}PopMenuArrowPosition;

@protocol PopMenuDelegate <NSObject>
@optional
-(void)popMenuDidDismissed:(PopMenu *)popMenu;
@end

@interface PopMenu : UIView
-(instancetype)initWithContentView:(UIView *)contentView;
+(instancetype)popMenuWithContentView:(UIView *)contentView;
-(void)setBackground:(UIImage *)background;
-(void)showInRect:(CGRect)rect;
-(void)dismiss;
@property (nonatomic,strong) id<PopMenuDelegate> popMenudelegate;
@property(nonatomic,assign,getter = isdimBackground)BOOL dimBackground;
@property(nonatomic,assign) PopMenuArrowPosition arrowPosition;
@end
